package com.example.sfm.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author sfm
 * @since 2025-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("courses")
@Schema(name="Courses对象",description = "课程表")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Courses implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "课程ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "课程名称")
    private String courseName;

    @Schema(description = "课程编号")
    private String courseCode;

    @Schema(description = "授课教师ID")
    private Integer teacherId;

    @Schema(description = "课程简介")
    private String description;

    @Schema(description = "学分")
    private Integer credits;

    @Schema(description = "开设学期")
    private String semester;

    @Schema(description = "最大选课人数")
    private Integer maxStudents;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;


}
